//
//  DLGuideViewController.m
//  DlNote
//
//  Created by DongL on 2017/6/27.
//  Copyright © 2017年 DongL. All rights reserved.
//

#import "DLGuideViewController.h"
#import "Masonry.h"
#import "DLDiaryViewController.h"
#import "DLNoteViewController.h"
@interface DLGuideViewController ()

@end

@implementation DLGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor blueColor];
    UISwipeGestureRecognizer *LeftSwipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(presentVc:)];
    [LeftSwipe setDirection:UISwipeGestureRecognizerDirectionLeft];
    UISwipeGestureRecognizer *RightSwipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(presentVc:)];
    [self.view addGestureRecognizer:LeftSwipe];
    [self.view addGestureRecognizer:RightSwipe];
    
//    self.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    
}

- (void)presentVc: (UISwipeGestureRecognizer *)swipe {
    
    if (swipe.direction == UISwipeGestureRecognizerDirectionLeft) {
        NSLog(@"左滑");
        DLDiaryViewController *diaryVc = [[DLDiaryViewController alloc] init];
//        diaryVc.transitioningDelegate = self;
        [self presentViewController:diaryVc animated:YES completion:nil];
        
    }else if (swipe.direction == UISwipeGestureRecognizerDirectionRight) {
        NSLog(@"右滑");
        DLNoteViewController *noteVc = [[DLNoteViewController alloc] init];
        [self presentViewController:noteVc animated:YES completion:nil];
        
    }else if (swipe.direction == UISwipeGestureRecognizerDirectionUp) {
        NSLog(@"上滑");
    }else if (swipe.direction == UISwipeGestureRecognizerDirectionDown) {
        NSLog(@"下滑");
    }

}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
